# **********************************************************************
#
# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

# Ice version 3.3.1
# Generated from file `DigitalOut.ice'

import Ice, IcePy, __builtin__

if not Ice.__dict__.has_key("_struct_marker"):
    Ice._struct_marker = object()
import TeRKCommon_ice

# Included module Ice
_M_Ice = Ice.openModule('Ice')

# Included module Glacier2
_M_Glacier2 = Ice.openModule('Glacier2')

# Included module peer
_M_peer = Ice.openModule('peer')

# Included module TeRK
_M_TeRK = Ice.openModule('TeRK')

# Start of module TeRK
__name__ = 'TeRK'

if not _M_TeRK.__dict__.has_key('DigitalOutCommandException'):
    _M_TeRK.DigitalOutCommandException = Ice.createTempClass()
    class DigitalOutCommandException(_M_TeRK.CommandException):
        def __init__(self, reason=''):
            _M_TeRK.CommandException.__init__(self, reason)

        def ice_name(self):
            return 'TeRK::DigitalOutCommandException'

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

    _M_TeRK._t_DigitalOutCommandException = IcePy.defineException('::TeRK::DigitalOutCommandException', DigitalOutCommandException, (), _M_TeRK._t_CommandException, ())
    DigitalOutCommandException.ice_type = _M_TeRK._t_DigitalOutCommandException

    _M_TeRK.DigitalOutCommandException = DigitalOutCommandException
    del DigitalOutCommandException

if not _M_TeRK.__dict__.has_key('DigitalOutCommand'):
    _M_TeRK.DigitalOutCommand = Ice.createTempClass()
    class DigitalOutCommand(object):
        def __init__(self, digitalOutMask=None, digitalOutValues=None):
            self.digitalOutMask = digitalOutMask
            self.digitalOutValues = digitalOutValues

        def __hash__(self):
            _h = 0
            if self.digitalOutMask:
                for _i0 in self.digitalOutMask:
                    _h = 5 * _h + __builtin__.hash(_i0)
            if self.digitalOutValues:
                for _i1 in self.digitalOutValues:
                    _h = 5 * _h + __builtin__.hash(_i1)
            return _h % 0x7fffffff

        def __cmp__(self, other):
            if other == None:
                return 1
            if self.digitalOutMask < other.digitalOutMask:
                return -1
            elif self.digitalOutMask > other.digitalOutMask:
                return 1
            if self.digitalOutValues < other.digitalOutValues:
                return -1
            elif self.digitalOutValues > other.digitalOutValues:
                return 1
            return 0

        def __str__(self):
            return IcePy.stringify(self, _M_TeRK._t_DigitalOutCommand)

        __repr__ = __str__

    _M_TeRK._t_DigitalOutCommand = IcePy.defineStruct('::TeRK::DigitalOutCommand', DigitalOutCommand, (), (
        ('digitalOutMask', (), _M_TeRK._t_BooleanArray),
        ('digitalOutValues', (), _M_TeRK._t_BooleanArray)
    ))

    _M_TeRK.DigitalOutCommand = DigitalOutCommand
    del DigitalOutCommand

if not _M_TeRK.__dict__.has_key('DigitalOutController'):
    _M_TeRK.DigitalOutController = Ice.createTempClass()
    class DigitalOutController(_M_TeRK.AbstractCommandController):
        def __init__(self):
            if __builtin__.type(self) == _M_TeRK.DigitalOutController:
                raise RuntimeError('TeRK.DigitalOutController is an abstract class')

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::TeRK::AbstractCommandController', '::TeRK::DigitalOutController', '::TeRK::PropertyManager')

        def ice_id(self, current=None):
            return '::TeRK::DigitalOutController'

        def ice_staticId():
            return '::TeRK::DigitalOutController'
        ice_staticId = staticmethod(ice_staticId)

        #
        # Operation signatures.
        #
        # def execute(self, command, current=None):

        def __str__(self):
            return IcePy.stringify(self, _M_TeRK._t_DigitalOutController)

        __repr__ = __str__

    _M_TeRK.DigitalOutControllerPrx = Ice.createTempClass()
    class DigitalOutControllerPrx(_M_TeRK.AbstractCommandControllerPrx):

        def execute(self, command, _ctx=None):
            return _M_TeRK.DigitalOutController._op_execute.invoke(self, ((command, ), _ctx))

        def execute_async(self, _cb, command, _ctx=None):
            return _M_TeRK.DigitalOutController._op_execute.invokeAsync(self, (_cb, (command, ), _ctx))

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_TeRK.DigitalOutControllerPrx.ice_checkedCast(proxy, '::TeRK::DigitalOutController', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_TeRK.DigitalOutControllerPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_TeRK._t_DigitalOutControllerPrx = IcePy.defineProxy('::TeRK::DigitalOutController', DigitalOutControllerPrx)

    _M_TeRK._t_DigitalOutController = IcePy.defineClass('::TeRK::DigitalOutController', DigitalOutController, (), True, None, (_M_TeRK._t_AbstractCommandController,), ())
    DigitalOutController.ice_type = _M_TeRK._t_DigitalOutController

    DigitalOutController._op_execute = IcePy.Operation('execute', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), _M_TeRK._t_DigitalOutCommand),), (), None, (_M_TeRK._t_DigitalOutCommandException,))

    _M_TeRK.DigitalOutController = DigitalOutController
    del DigitalOutController

    _M_TeRK.DigitalOutControllerPrx = DigitalOutControllerPrx
    del DigitalOutControllerPrx

# End of module TeRK
